import request from "@/utils/request"

export function queryMenu(params) {
  return request({
    url: "/system/menu/tree",
    method: "get",
    params
  })
}
// 新增菜单
export function addMenu(data) {
  return request({
    url: "/system/menu",
    method: "post",
    data
  })
}
// 修改菜单
export function updateMenuApi(data) {
  return request({
    url: "/system/menu",
    method: "put",
    data
  })
}
// 删除菜单
export function deletMenu(id) {
  return request({
    url: `/system/menu/${id}`,
    method: "delete",
  })
}
// 菜单详情
export function queryMenuDetail(id) {
  return request({
    url: `/system/menu/${id}`,
    method: "get",
  })
}
// 菜单树形
export function findTree() {
  return request({
    url: `/system/menu/tree`,
    method: "get",
  })
}
